package com.ddf.controller;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ddf.dao.UserDao;
import com.ddf.entity.User;

@Controller
@RequestMapping("/requestResponseBodyDemo")
public class RequestResponseBodyDemo {
	
	private static final String SUCCESS = "success";
	
	@Autowired
	private UserDao userDao;
	
	@RequestMapping("/testResponseJson")
	@ResponseBody
	public Collection<User> testResponseJson() {
		return userDao.getAllUser();
	}
}
